﻿package mortal.game.scene3D.model.player
{
    import baseEngine.core.*;
    import baseEngine.system.*;
    import com.mui.core.*;
    import flash.display.*;
    import flash.geom.*;
    import frEngine.core.*;
    import frEngine.primitives.*;
    import frEngine.shader.filters.fragmentFilters.*;
    import mortal.game.resource.*;
    import mortal.game.scene3D.layer3D.utils.*;

    public class DefaultPlayer extends FrPlane
    {
        private var _offsetH:int = 0;
        public static const instance:DefaultPlayer = new DefaultPlayer;

        public function DefaultPlayer()
        {
            var _loc_1:* = GlobalClass.getBitmapData(ImagesConst.PlayerDefaultShadow);
            var _loc_2:* = new Texture3D(_loc_1, Texture3D.MIP_NONE);
            _loc_2.immediatelyUpload();
            var _loc_3:* = new TextureFilter(_loc_2);
            super("defaultPlayer");
            this.reinit(Global3D.scene.renderLayerList, _loc_1.width, _loc_1.height, _loc_3, false, null, "+xy");
            this.addedToScene(Global3D.scene);
            this.material.materialParams.setBlendMode(EBlendType.BLEND_ALPHA3);
            this.rotationX = Scene3DUtil.cameraAngle;
            this.material.materialParams.depthWrite = true;
            this._offsetH = _loc_1.height / 2;
            return;
        }// end function

        public function drawImp(param1:Vector3D) : void
        {
            this.isHide = false;
            this.setPosition(param1.x, param1.y, param1.z + this._offsetH);
            this.draw(false);
            this.isHide = true;
            return;
        }// end function

    }
}
